#include <Wire.h>
#include <L3G4200D.h>

L3G4200D gyro;

int x = 0;
int y = 0;
int z = 0;

void setup()
{
  Serial.begin(9600);

  Serial.println("starting up L3G4200D");
  
  gyro.begin();

  delay(1500); //wait for the sensor to be ready 
  
  Serial.println("");
}

void loop()
{
  x = gyro.getX();
  y = gyro.getY();
  z = gyro.getZ();   
 
  Serial.print("X:");
  Serial.print(x);

  Serial.print(" Y:");
  Serial.print(y);

  Serial.print(" Z:");
  Serial.println(z);

  delay(100); //Just here to slow down the serial to make it more readable
}
